import { createApp } from 'vue'
import App from './App.vue'
import './style.css'

import '@/style/reset.less'
// import api from '@/util/api'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; //引入持久化插件
import router from './router'

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate) //将插件添加到 pinia 实例上
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// app.config.globalProperties.$api = api;  
// test
app.use(router)
.use(ElementPlus)
.use(pinia)
.mount('#app')
